package com.cloud.drore.eboss.operation.mapper.provider;

import com.cloud.drore.eboos.common.constant.CommonConstant;

/**
 * 浙江卓锐科技股份有限公司 版权所有  Copyright 2018<br>
 *
 * @Description: <br>
 * @Project: eboos <br>
 * @CreateDate: Created in 2018/3/7 9:05 <br>
 * @Author: <a href="1451173193@qq.com">杨亮</a>
 */
public class OTAGetProductInfoProvider {
    public String getProductPriceAndStockSql(Long merchantId,String productNum){
        StringBuffer sql=new StringBuffer("");
        sql.append("select a.id,a.product_num,b.sales_price from eboos_product a \n" +
                "left join eboos_distributor_product_association b on b.main_id=a.id \n" +
                "left join eboos_merchant c on c.id=b.distributor_id " +
                "where a.product_num ='"+productNum+"' \n" +
                " and a.status='"+ CommonConstant.THE_SHELVES+"' and c.merchant_state='"+CommonConstant.MERCHANT_AUDIT_ALREADY+"' and b.distributor_id="+merchantId+"");
        return sql.toString();
    }
}
